import {
  EventRecommendationShape,
  PhysicalItemRecommendationShape,
  TabSectionData,
} from "@/data/shared/entityShapes";
import { detailsType } from "../shared/details";
import { ImageStringFormat, VideoStringFormat } from "../shared/mediaTypes";
import { DateShape, TimeShape } from "../shared/timeTypes";

export enum ApiTalkTypes {
  Offline = 1,
  Online = 2,
}

export enum ApiOnlineTalkStatus {
  Live = 1,
  Reserved = 2,
  Ended = 3,
  OnDemand = 4,
  Playback = 5,
}

export interface TalkShape extends detailsType {
  status: Boolean;
  id: number;
  name: string;
  introduction: string;
  price: number;
  cover: string;
  carouselMap: ImageStringFormat[];
  schedulingId?: number;
  schedulingDate: DateShape; // "2022-09-30";
  schedulingStartTime: TimeShape; // "08:00";
  schedulingEndTime: TimeShape; // "16:00";
  remainingSeatCount: number;
  isAppointment?: Boolean;
  isStopAppointment?: Boolean;
  isCollection?: Boolean;
  isDeleted?: number;
  link?: string;
  liveBroadLink?: string;
  liveBroadcastStatus?: number;
  completedOrderQuantity?: number;
  orderQuantityToBeWrittenOff?: number;
  totalSeatsLeftForAllScheduledTalk?: number;
  appointmentStatus?: number;
  sharePoster: string;
  mainPictureVideo: VideoStringFormat | "";

  courseAddress: {
    courseAddress: string;
    courseAddressInfo: string;
  };

  talkType: ApiTalkTypes;
  talkTypeName: string;
  duration: string;
  optionalLanguage: {
    [key: string]: string;
  };
  viewingPlatformName: string;

  talkInfo: {
    id: number;
    talkId: number;
    details: TabSectionData;
  };

  eventRecommendations?: EventRecommendationShape[];

  shopRecommendations?: PhysicalItemRecommendationShape[];
}
